<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="jquery-3.1.0.min.js"></script>
</head>
<body>
    <p id="p1">hello world</p>
    <button id="btn1" >按钮</button>
    <button id="btn2" onclick="appendText()">按钮</button>
    <script>
        $(document).ready(function(){
            $("#btn1").click(function(){
                $("#p1").append("this is my thing");
            });
        })
    </script>
    <script>
        /*用html/jquery/dom来追加元素*/
        function appendText(){
            debugger;
        var tex1="<p>wo</p>"   //用html添加元素
        var text2=$("#p1").text("shi")  //用jquery添加元素
            $("body").append(tex1,text2);
        }
    </script>
</body>
</html>